<template>
  <commonformdialog
    :isshowDialogs="isshowDialog"
    :dialogTitle="dialogTitle"
    @closetextDialog="closeDialog"
    @confirmbtn='confirmbtn'
    :isshowFooter='false'
    :dialogWidth='"600px"'
    :topHeight='"20vh"'
    :enterTitle='true'
  >
    <div class="formarea">
      <div class="openlist">
        <ul>
          <li v-for="(item,index) in openlist" :key="index" @click="goauth(item)">
            <div class="left-item">{{item.title}}<span class="desctitle">{{item.desc}}</span></div>
            <div class="right-item">{{item.subtext}}</div>
          </li>
        </ul>
      </div>
    </div>
  </commonformdialog>
</template>

<script>
import commonformdialog from '@/components/commondialog/commondialog'
export default {
  data() {
    return {
        openlist:[
          {
            id:0,
            title:'驾校认证',
            desc:'(提供营业执照等认证资料)',
            path:'/drivingauth/drivingauth',
            subtext:'去认证'
          },
          {
            id:1,
            title:'考场',
            desc:'(至少有一个考场开启线上展示)',
            path:'/organizationmanage/examination',
            subtext:'去完善'
          },
          {
            id:2,
            title:'训练场',
            desc:'(至少有一个训练场开启线上展示)',
            path:'/organizationmanage/training',
            subtext:'去完善'
          },
          {
            id:3,
            title:'班型',
            desc:'(至少有一个班型开启线上展示)',
            path:'/classtype/classtype',
            subtext:'去完善'
          }
        ]
    }
  },
  components: {
    commonformdialog,
  },
  props: {
    //是否显示弹窗
    isshowDialog: {
      type: Boolean,
      default: false,
      required: true,
    },
    //表单的名字
    dialogTitle: {
      type: String,
      default: '',
      required: true,
    },
  },
  methods: {
    closeDialog() {
      //重置表单
      this.$emit('closedialog')
    },
    confirmbtn(){
       
    },
    //认证
    goauth(item){
      this.$router.push({
        path:item.path
      })
    }
  },
}
</script>

<style scoped lang='scss'>
.opentitle{
  p{
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 15px;
  }
}
.openlist{
  ul{
    margin: 0;
    padding: 0;
    list-style: none;
    li{
      background-color: #f4f6ff;
      
      margin: 0;
      padding: 0;
      display: flex;
      justify-content: space-between;
      padding: 10px 12px;
      box-sizing: border-box;
      border-radius: 5px;
      margin-bottom: 15px;
      .left-item{
        font-weight: bold;
        color: #333;
        span{
          font-weight: normal;
          color: #666;
          margin-left: 8px;
        }
      }
      .right-item{
        color: #4c68ef;
        cursor: pointer;
      }
    }
  }
}
</style>